import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from "./store";
import pinia from './pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css';
import './assets/svgIcon'
import SvgIcon from './components/SvgIcon/index.vue' // svg组件
import './versionUpdatePrompt'
import { vEllipsis } from './directives/v-ellipsis'
import { vLoading } from './directives/v-loading'
import vSlideIn from './directives/v-slide-in';
import vWatermark from "./directives/v-watermark";
import './assets/style/index.less'
import ViewUIPlus from 'view-ui-plus'
import 'view-ui-plus/dist/styles/viewuiplus.css'
// import BinUi from 'bin-ui';
// import 'bin-ui/dist/style.css'
// import 'theme-color/dist/style.css'//自定义主题色

// canvas库
import VueKonva from 'vue-konva';
import i18nPlugin from './plugins/i18n'

import Draggable from './components/vuedraggable/dist/vuedraggable.umd.js'

import { createI18n } from "vue-i18n";
// 导入语言文件
import lang from './i18n/temp/translate.json';
// 创建 i18n 实例
const i18n = createI18n({
    locale: "zh", // 设置默认语言
    fallbackLocale: "zh", // 设置回退语言
    messages: {
        en: lang.en, // 英文语言包
        zh: lang.zh, // 中文语言包
    },
});
const app = createApp(App)
vEllipsis(app)//全局指令
vLoading(app)//全局指令
vSlideIn(app)
vWatermark(app);

// 去除警告信息
app.config.warnHandler = () => { };

app.use(router)
    .use(store)
    .use(pinia)
    .use(VueKonva)
    .use(ElementPlus)
    .use(ViewUIPlus)
    .use(i18n)
    .use(i18nPlugin, {
        greetings: {
            hello: "Bonjour!",
        },
    })
    // .use(BinUi)
    .component("svg-icon", SvgIcon)
    .component("Draggable", Draggable)
    .mount("#app");
	
